<ui:composition xmlns="http://www.w3.org/1999/xhtml"
                xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
                xmlns:f="http://xmlns.jcp.org/jsf/core"
                xmlns:h="http://xmlns.jcp.org/jsf/html"
                xmlns:c="http://java.sun.com/jsp/jstl/core"
                template="/WEB-INF/layout/template.xhtml">
    <ui:define name="pageTitle">ADD TASK </ui:define>
    <ui:define name="content">
        <div class="row">
            <div class="col-md-12">
                <c:set var="formActionUrl" value="#{request.contextPath}/mvc/tasks"/>
                <form id="form" name="form" role="form" class="form" action="${formActionUrl}" method="post">
                    <input type="hidden" name="${mvc.csrf.name}"
                           value="${mvc.csrf.token}"/>
                    <div
                        class="form-group">
                        <label class="control-label" for="name">Task Name:</label>
                        <input id="name" name="name" type="text" class="form-control" value="#{task.name}"/>
                        <div class="help-block">
                        </div>
                    </div>
                    <div
                        class="form-group">
                        <label class="control-label" for="description">Task Description:</label>
                        <textarea id="description" name="description" class="form-control" rows="8">#{task.description}</textarea>
                        <div class="help-block">
                        </div>
                    </div>

                    <div class="form-group">
                        <button id="submitTask" type="submit" class="btn btn-lg btn-primary">Add Task</button>
                    </div>
                </form>
            </div>
        </div>
    </ui:define>
</ui:composition>